package com.mapper;
import com.domain.Admin;
import com.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {
    @Select("SELECT * FROM t_admin WHERE id=#{id}")
    public Admin findById(Integer id);
    @Insert("INSERT INTO t_admin(admin_name,pwd,phone)values (#{adminName},#{pwd},#{phone})")
    public int inserUser(Admin user);
    @Select("SELECT * FROM t_user WHERE admin_name =#{adminName} and pwd=#{pwd}")
    public Admin userLogin(Admin user);

}
